public class Test6 {
    public static void main(String[] args){
        for (int i = 100; i <= 1000; i++) {
            if (isNarcissistic(i)){
                System.out.println(i);
            }
        }
    }

    public static boolean isNarcissistic(int number) {
        int sum = 0;
        int temp = number;
        int digits = 3;

        while (temp != 0){
            int digit = temp % 10;
            sum += Math.pow(digit,digits);
            temp /= 10;
        }
        return sum ==number;
    }
}
